The hazard function conditional on the two frailties $v_i$ and $w_{ij}$ for the $k^{th}$ individual of the $j^{th}$ subgroup of the $i^{th}$ group is :
$$\lambda_{ijk}(t|v_i,w_{ij})=v_iw_{ij}\lambda_0(t)exp(\bold{\beta^{'}X_{ijk}})$$
$$\small{ v_i\sim\Gamma\left(\frac{1}{\alpha},\frac{1}{\alpha}\right) \hspace{0.05cm}i.i.d. \hspace{0.2cm} \bold{E}(v_i)=1 \hspace{0.2cm}\bold{Var}(v_i)=\alpha \hspace{0.5cm} w_{ij}\sim\Gamma\left(\frac{1}{\eta},\frac{1}{\eta}\right)\hspace{0.05cm}i.i.d. \hspace{0.2cm} \bold{E}(w_{ij})=1 \hspace{0.2cm}\bold{Var}(w_{ij})=\eta}$$
where $\lambda_0(t)$ is the baseline hazard function, $X_{ijk}$ denotes the covariate vector and $\beta$ the corresponding vector of regression parameters.
subcluster()kappa1 (or kappa2), a solutiINITIAL VALUES
The splines and the regression coefficients are initialized to 0.1. The program fits an adjusted Cox model to provide new initial values for the regression and the splines coefficients. The variances of the frailties are initialized to 0.1. Then, a shared frailty model with covariates with only subgroup frailty is fitted to give a new initial value for the variance of the subgroup frailty term. Then, a shared frailty model with covariates and only group frailty terms is fitted to give a new initial value for the variance of the group frailties. In a last step, a nested frailty model is fitted.
PARAMETERS LIMIT VALUES
As frailtypack is written in Fortran 77 some parameters had to be hard coded in. The default values of these parameters are, with the corresponding variable name in the fortran code between brackets.
maximum number of observations (ndatemax): 30000 maximum number of groups (ngmax): 1000 maximum number of subjects (nsujetmax): 15000 maximum number of parameters (npmax) :50 maximum number of covariates (nvarmax):50 maximum number of subgroups (nssgmax):5000 If these parameters are not large enough (an error message will let you know this), you need to reset them in nested.f and recompile.
10^{-4})$,>V. Rondeau, D Commenges, and P. Joly (2003). Maximum penalized likelihood estimation in a gamma-frailty model. Lifetime Data Analysis 9, 139-153.
D. Marquardt (1963). An algorithm for least-squares estimation of nonlinear parameters. SIAM Journal of Applied Mathematics, 431-441.
print.nestedPenal,
summary.nestedPenal,
plot.nestedPenal,
cluster,
subcluster,
strata### Nested model (or hierarchical model) with 2 covariates ###
data(dataNested)
modClu<-frailtyPenal(Surv(t1,t2,event)~cluster(group)+subcluster(subgroup)+
cov1+cov2,Frailty=TRUE,data=dataNested,n.knots=8,kappa1=50000)
# It takes around 24 minutes to converge (depends on the processor)#
print(modClu)
summary(modClu)
plot(modClu)
modClu.str<-frailtyPenal(Surv(t1,t2,event)~cluster(group)+subcluster(subgroup)+
cov1+strata(cov2)
,Frailty=TRUE,data=dataNested,n.knots=8,kappa1=20000,kappa2=20000)
# It takes around 8 minutes to converge (depends on the processor)#
print(modClu.str)
summary(modClu.str)
plot(modClu.str)Run the code above in your browser using DataLab